<?php
  require '../../include/library.inc.php';
  require '../../include/admin_login.inc.php';
    
  $new_id = intval($_GET['new_id']);

  if($new_id) {
	  
	$sql = "DELETE FROM 
               news
            WHERE
               new_id = '$new_id'
             ";
    query($sql);
	
	$sql = "DELETE FROM 
               news_description
            WHERE
               new_id = '$new_id'
             ";
    query($sql);
	
	$sql = "DELETE FROM 
				   sef_url
				WHERE
				   query = '$new_id'
				   AND
				   tamplate = 'new'
				 ";
		query($sql);
				
	$_SESSION['message'] = 'Новината е изтрита успешно!';
	
  }
  
  redirect($_SERVER['HTTP_REFERER']);
 
?>